﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/AdminSchedule.master" AutoEventWireup="true" CodeFile="BusEdit.aspx.cs" Inherits="Pages_Carrier_BusEdit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" Runat="Server">
	<link rel="stylesheet" type="text/css" media="screen" href="../../styles/EntityEditStyle.css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphContent" Runat="Server">
	<a href='<%= ResolveUrl("~/Pages/Carrier/Bus.aspx") %>'>Вернуться к списку автобусов</a>
	<div style="width:100%;">
		<asp:Label runat="server" ID="lbMessage" />
		<asp:ValidationSummary ID="vsBusSave" runat="server" ValidationGroup="vgSave" CssClass="ValidationSummary" />
	</div>
	<div class="edit-form">
		<div class="edit-row">
			<div class="edit-label">Название автобуса</div>
			<div class="edit-control">
				<asp:TextBox runat="server" ID="tbBusName" />
				<asp:RequiredFieldValidator ID="rfvBusName" runat="server" ControlToValidate="tbBusName" ValidationGroup="vgSave" Text="*" ErrorMessage="Не указано название автобуса" EnableClientScript="true" Display="Dynamic">
				</asp:RequiredFieldValidator>
			</div>
		</div>
		<div class="edit-row">
			<div class="edit-label">Количество мест</div>
			<div class="edit-control">
				<asp:TextBox runat="server" ID="tbBusPlaceCount" />
				<asp:RequiredFieldValidator ID="rfvBusPlaceCount" runat="server" ControlToValidate="tbBusPlaceCount" ValidationGroup="vgSave" Text="*" ErrorMessage="Не указано количество мест" EnableClientScript="true" Display="Dynamic">
				</asp:RequiredFieldValidator>
				<asp:RangeValidator ID="rvBusPlaceCount" runat="server" 
					ErrorMessage="Не правильный формат" 
					ControlToValidate="tbBusPlaceCount" 
					Text="*" 
					Type="Integer" 
					MinimumValue="1" 
					MaximumValue="10000" 
					ValidationGroup="vgSave" 
					Display="Dynamic" >
				</asp:RangeValidator>
			</div>
		</div>
	</div>
	<div class="buttons">
		<asp:Button runat="server" ID="btnSave" Text="Сохранить" OnClick="OnBusSave" ValidationGroup="vgSave" />
		<asp:Button runat="server" ID="btnCancel" Text="Отменить" OnClick="OnCancel" />
	</div>
</asp:Content>

